package cn.interceptor;

import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;

public class MyEJBInterceptor {

	@AroundInvoke
	public Object myInterceptor(InvocationContext context) throws Exception{
		System.out.println("===================================EJB拦截器");
		System.out.println(context.getTarget().toString().substring(0, context.getTarget().toString().lastIndexOf("@")));
		System.out.println(context.getMethod().getName()+"对此方法进行拦截");
		return context.proceed();
	}
}
